import 'package:flutter/material.dart';
import 'package:untitled1/app/widgets/dialog/MyConfirmCancelDialog.dart';

import '../../res/myColors.dart';

void PayDialog({
  required BuildContext context,
  required String money,
  String title = '提示',
  String cancelText = '取消',
  VoidCallback? onCancel,
  String confirmText = '确定',
  VoidCallback? onConfirm,
  double? width,
  double? height,
}) {
  MyConfirmCancelDialog(
    context: context,
    title: title,
    onCancel: onCancel,
    onConfirm: onConfirm,
    confirmText: confirmText,
    cancelText: cancelText,
    width: width,
    height: height,
    content: Container(
      // color: Colors.amber,
      child: Column(
        children: [
          // 第一行，部分红色高亮
          RichText(
            textAlign: TextAlign.center,
            text: TextSpan(
              text: '请支付',
              style: const TextStyle(color: Colors.black87, fontSize: 14),
              children: [
                TextSpan(
                  text: money,
                  style: const TextStyle(
                    color: Colors.red,
                    fontWeight: FontWeight.bold,
                    fontSize: 30,
                  ),
                ),
                const TextSpan(
                  text: '元',
                  style: TextStyle(color: Colors.black87, fontSize: 14),
                ),
              ],
            ),
          ),
          const SizedBox(height: 10),

          // 第二行红色警告文字
          const Text(
            '锁定后，请在15分钟内电话沟通未及时沟通的系统自动取消锁定',
            textAlign: TextAlign.center,
            style: TextStyle(color: Colors.red, fontSize: 13),
          ),
          const SizedBox(height: 6),

          // 第三行灰色提示
          const Text(
            '（23点-次日8点，不计时）',
            textAlign: TextAlign.center,
            style: TextStyle(color: Colors.grey, fontSize: 12),
          ),
        ],
      ),
    ),
  );
}
